#include <iostream>
#include <algorithm>

/*
题目可以转换成优化问题：
    max ax + by
    st. 2*x + y <= m
        x + x*y <= n
*/